IF exists(SELECT * FROM dbo.sysobjects WHERE name='vulEmailverlangens' AND xtype='P') 
BEGIN
	DROP PROCEDURE vulEmailverlangens
END
GO

create procedure vulEmailverlangens
as
insert into emailverlangens(naamcode,wilMail,wilMailDoorgestuurd,wilFacteurken,wilMailLists)
select l.naamcode,1,1,1,1
from leraars..leraars as l
	left join emailVerlangens as e
	on e.naamcode = l.naamcode
where e.naamcode is null